<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../css/mui.min.css" />
	</head>
	<style>
		.title {
			width: 100%;
		}
		
		.content {
			width: 100px;
		}
		
		.title div {
			width: 120px !important;
		}
		
		#list {
			/*避免导航边框和列表背景边框重叠，看起来像两条边框似得；*/
			margin-top: -1px;
		}
		
		h4 {
			font-size: 16px;
			font-weight: 100;
			margin-bottom: 6px;
			overflow: inherit;
		}
		
		ul {
			margin: 0;
			padding: 0;
		}
		
		ul li span {
			display: inline-block;
		}
		
		ul li span:nth-of-type(1) {
			width: 25%;
		}
		
		ul li span:nth-of-type(2) {
			width: 75%;
			word-break: normal;
			white-space: pre-warp;
			word-wrapL: break-word;
		}
		p{
			margin-left: 20px;
			font-size: 16px;
			font-weight: bolder;
		}
	</style>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-back  mui-icon-backmui-pull-left"></a>
			<h1 class="mui-title">订单详情</h1>
		</header>
		<div class="mui-content">
			<ul id="list" class="">
				<li class="mui-table-view-cell title">
					<h4>
						订单号
					</h4>
					<p id="orderNo">

					</p>
				</li>
				<li class="mui-table-view-cell title">
					<h4 class="">板子数量</h4>
					<p id="boardCount">

					</p>
				</li>
				<li class="mui-table-view-cell title">
					<h4 class="">订单状态</h4>
					<p id="status">

					</p>
				</li>
				<li class="mui-table-view-cell title">
					<h4 class="">项目专员</h4>
					<p id="userName">

					</p>
				</li>
				<li class="mui-table-view-cell title">
					<h4 class="">下单时间</h4>
					<p id="orderTime">

					</p>
				</li>
				<li class="mui-table-view-cell title">
					<h4 class="">订单金额</h4>
					<p id="orderMoney">

					</p>
				</li>
				<li class="mui-table-view-cell title">
					<h4>采购商留言</h4>
					<div class="mui-row">
						<div class="mui-col-sm-12 mui-col-xs-12">
							<p id="purchaserMesg">

							</p>
						</div>
					</div>
				</li>
				<li class="mui-table-view-cell title">
					<h4 class="">收货地址</h4>
					<p id="goodsAddress">

					</p>
				</li>
			</ul>
			<!--<div class="mui-row">
				<div class="mui-col-xs-3 mui-col-sm-3">
					<a id="productLog" href="" class="mui-btn mui-btn-primary mui-btn-outlined mui-btn-block">获取日志</a>
				</div>
				<div id="productReport" class="mui-col-xs-6 mui-col-sm-7">
					<a href="" class="mui-btn mui-btn-warning mui-btn-outlined mui-btn-block">获取报告</a>
				</div>
				<div id="needs" class="mui-col-xs-3 mui-col-sm-3">
					<a href="" class="mui-btn mui-btn-primary mui-btn-outlined mui-btn-block">查看需求</a>
				</div>
			</div>-->
			<p style="color: red;">注意事项：</p>
			<p class="mui-h5">如果没有收到货，或收到货后出现问题，您可以联系项目专员为您处理！</p>
			<p class="mui-h5">收到货后三天内如有疑问请尽快联系项目专员，否则视为完成交易！</p>
			<a href="../humanServices/human.html" style="height: 50px;" type="button" class="mui-btn mui-btn-primary mui-btn-block mui-btn-outlined">有问题请联系</a>
	</body>
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/myjs/localVarchar.js"></script>
	<script src="../../js/ipjs/ip.js"></script>
	<script src="../../js/constatnt/var.js"></script>
	<script type="text/javascript">
		mui.init();
		mui.plusReady(function() {
			//判断网络是否正常
			document.addEventListener("netchange", wainshow, false);
			var self = plus.webview.currentWebview();
			mui.ajax(ip + '/order/orderInfo/' + self.idValue, {
				type: 'get',
				timeout: 10000,
				success: function(data) {
					if(data.status == OPERATION_SUCCESS) {
						document.getElementById("purchaserMesg").innerHTML = data.data.remark;
						document.getElementById("orderMoney").innerHTML = data.data.payMoney;
						document.getElementById("orderTime").innerHTML = data.data.createTime;
						document.getElementById("userName").innerHTML = data.data.remark;
						document.getElementById("orderNo").innerHTML = data.data.orderNo;
						document.getElementById("boardCount").innerHTML = data.data.boardCount;
						document.getElementById("status").innerHTML = data.data.status;
						 
						mui.ajax(ip + '/address/selectAddress/' + data.data.receivingAddressId, {
							type: 'get',
							timeout: 10000,
							success: function(addres) {
								if(addres.status == OPERATION_SUCCESS) {
									document.getElementById("goodsAddress").innerHTML =
										addres.data.province + " " + 
										addres.data.city + " " + 
										addres.data.county+ " " + 
									addres.data.detailed;
								}
							},
							
							error: function(xhr, type, errorThrown) {
								//异常处理；
								mui.toast("系统异常！");
							}
						});

					}
				},
				error: function(xhr, type, errorThrown) {
					//异常处理；
					mui.toast("系统异常！");
				}
			});

		});
		function wainshow() {
			if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
				mui.toast("您的网络异常，请连接网络！");
			} else {}
		}
	</script>

</html>